<html>
<head>
    <meta charset="UTF-8">
    <include file='Public/js'/>
    <script type="text/javascript">

        function save() {

            $.post(
                    '{:U("Car/save")}',
                    $("#carinfo").serialize(),
                    function (data) {
                        if (data == 'success') {
                            $("#CarModalTip").modal('show');
                        } else {
                            alert('发布失败')
                        }
                    }
            )

        }
    </script>
    <style>
        .jiange div {
            margin-top: 8px;
            font-size: 11px;
            color: #626262;
        }

        .jiange button {
            margin-top: 8px;

        }

        .jiange {
            font-size: 10px;
        }


    </style>
    <title>车源发布</title>
</head>
<body style="background-color: #ffffff">
<!-- Modal -->
<div class="modal fade" id="CarModalTip" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">信息发布</h4>
            </div>
            <div class="modal-body">
                车源发布成功!
            </div>
            <div class="modal-footer">
                <a type="button" class="btn btn-suc cess" href="{:U('carcenter')}" target="c">
                    查找货源
                </a>
                <a type="button" class="btn btn-success" href="{:U('Car')}">
                    继续发布
                </a>

            </div>
        </div>
    </div>
</div>


<!--	<div class="container" ">-->
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="page-header">
                <h3>
                    发布车源

                </h3>
            </div>
            <div class="container jiange" style="width: 800px;">
                <form id="carinfo" class="form-inline" action="" method="post" ng-app='app' ng-controller='cityCtrl'>
                    <div class="form-group" style="width: 100%" ng-app='app' ng-controller='cityCtrl'>
                        <div class="form-group">
                            <label class="control-label formlabel1">线　　路 </label>
                            <select class="form-control" ng-model="selected1" ng-options="s.text for s in list">
                                <option value="">--请选择省--</option>
                            </select>
                            <input hidden name='from_province' value="{{selected1.text}}">
                            <select class="form-control" ng-model="selected2"
                                    ng-options="sh.text for sh in selected1.children">
                                <option value="">--请选择市--</option>
                            </select>
                            <input hidden name='from_city' value="{{selected2.text}}">
                        </div>
                        <label>至</label>

                        <div class="form-group">
                            <select class="form-control" ng-model="selected3" ng-options="s.text for s in list">
                                <option value="">--请选择省--</option>
                            </select>
                            <input hidden name='to_province' value="{{selected3.text}}">
                            <select class="form-control" ng-model="selected4"
                                    ng-options="sh.text for sh in selected3.children">
                                <option value="">--请选择市--</option>
                            </select>
                            <input hidden name='to_city' value="{{selected4.text}}">

                        </div>
                    </div>
                    <div class="form-group">
                        <label>发车日期</label>
                        <input name="start_date" type="date" class="form-control" style="width: 169px;">
                    </div>
                    <div class="form-group">
                        <label>车　　主</label>
                        <input name="car_owner" type="text" class="form-control" placeholder="请输入车主名称"
                               style="width: 169px;">
                    </div>

                    <div class="form-group">
                        <label>车牌号码</label>
                        <input name="car_num" type="text" class="form-control" placeholder="请输入司机姓名"
                               style="width: 169px;">
                    </div>
                    <div class="form-group">
                        <label>司　　机</label>
                        <input name="driver" type="text" class="form-control" placeholder="请输入司机姓名"
                               style="width: 169px;">
                    </div>
                    <div class="form-group">
                        <label>手机号码</label>
                        <input name="mobile" type="text" class="form-control" placeholder="请输入手机号码"
                               style="width: 169px;">
                    </div>
                    <div class="form-group">
                        <label>车　　型</label>
                        <select name="car_type" class="form-control" style="width: 169px;">
                            <option>平板</option>
                            <option>高栏</option>
                            <option>封箱</option>
                            <option>高低板</option>
                            <option>槽罐</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>车　　长</label>
                        <select name="car_length" class="form-control" style="width: 169px;">
                            <option>9.6米</option>
                            <option>10.5米</option>
                            <option>13.5米</option>
                            <option>17米</option>
                            <option>18米</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>载　　重</label>
                        <select name="car_loading" class="form-control" style="width: 169px;">
                            <option>8T</option>
                            <option>10T</option>
                            <option>15T</option>
                            <option>20T</option>
                            <option>25T</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>备　　注</label>
                        <input name="remark" type="email" class="form-control" placeholder="填写备注信息"
                               style="width: 408px;">
                    </div>
                    <br>

                    <div style="text-align: center">
                        <button type="button" class="btn btn-primary btn-xs"
                                style="width: 80px;height: 30px;" onclick="save()">发布车源
                        </button>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>

</body>
</html>
